<ng-template #template>
  <div *ngIf="!!model" #elementContainer [class]="model.getRootCss()" [style]="model.getRootStyle()" [id]="model.id"
    [attr.data-name]="model.name" [attr.role]="model.ariaRole" [attr.aria-required]="model.ariaRequired"
    [attr.aria-invalid]="model.ariaInvalid" [attr.aria-label]="model.ariaLabel"
    [attr.aria-labelledby]="model.ariaLabelledBy" [attr.aria-describedby]="model.ariaDescribedBy"
    [attr.aria-expanded]="model.ariaExpanded">
    <sv-breadcrumbs
      *ngIf="model.singleInputHasActions"
      [model]="model.singleInputActions"
      [css]="model.cssClasses"
    ></sv-breadcrumbs>
    <div *ngIf="model.showErrorsAboveQuestion && model.hasVisibleErrors" [element]="model" sv-ng-errors></div>
    <div [element]="model" *ngIf="model.hasTitleOnLeftTop" sv-ng-element-header></div>
    <sv-single-input-summary
      *ngIf="!!model.singleInputSummary"
      [model]="model.singleInputSummary"
      [css]="model.cssClasses"
    ></sv-single-input-summary>
    <sv-ng-element
      *ngIf="!model.singleInputSummary && !!singleQuestion"
      [model]="singleQuestion"
    ></sv-ng-element>
    <ng-template
      *ngIf="!model.singleInputSummary && !singleQuestion"
      [component]="{ name: getQuestionContentWrapperComponentName(), data: getQuestionContentWrapperComponentData() }">
      <div [class]="model.cssContent" role="presentation" [visible]="model.renderedIsExpanded" [attr.aria-hidden]="model.contentAriaHidden" [attr.data-sv-drop-target-matrix-row]="model.dragDropMatrixAttribute" [attr.data-sv-drop-target-matrix]="model.dragDropMatrixAttribute">
        <ng-template
          [component]="{ name: getComponentName(), data: { model: model }, default: 'skeleton-question' }"></ng-template>
        <div *ngIf="model.hasComment" [class]="model.getCommentAreaCss(false)">
          <div [model]="model.locCommentText" sv-ng-string></div>
          <sv-ng-comment [question]="model"></sv-ng-comment>
        </div>
        <div *ngIf="model.hasDescriptionUnderInput" [class]="model.cssDescription" [attr.id]="model.ariaDescriptionId"
          [model]="model.locDescription" sv-ng-string></div>
      </div>
    </ng-template>
    <div [element]="model" *ngIf="model.hasTitleOnBottom" sv-ng-element-header></div>
    <div *ngIf="model.showErrorsBelowQuestion && model.hasVisibleErrors" [element]="model" sv-ng-errors></div>
  </div>
</ng-template>